1. Field of the Invention
The present invention relates to a magnetic sensor for a pointing device that detects the position of a magnet which is moved by an external operation force.
2. Description of the Related Art
As shown in FIG. 21, a conventionally known pointing device 100 includes a mounting substrate 101, a resin portion 102, a thin-disk-shaped magnet 103, and a magnetic sensor 110. The magnet 103 is supported above the mounting substrate 101 by means of the resin portion 102. When the magnet 103 receives no external operation force, it is located at a predetermined initial position. When the magnet 103 receives an external operation force, it moves with respect to the mounting substrate 101 in a direction parallel to a main face (X-Y plane) of the mounting substrate 101.
As shown in FIGS. 21 and 22, the magnetic sensor 110 includes a circuit board 111 and four Hall elements 112a, 112b, 112c, and 112d. The magnetic sensor 110 is fixed to the mounting substrate 101 to face the magnet 103 via the mounting substrate 101. Here, an axis which is parallel to a Z-axis direction and which passes through the centroid of the magnet 103 located at the initial position is considered to be the origin O of X and Y axes. The Hall element 112a and the Hall element 112c are disposed on the X-axis to be symmetric with respect to the Y-axis. The Hall element 112b and the Hall element 112d are disposed on the Y-axis to be symmetric with respect to the X-axis. The four Hall elements 112a, 112b, 112c, and 112d are spaced away from the origin O by the same distance.
The magnetic sensor 110 also includes a detection circuit as shown in FIG. 23. The detection circuit is formed on the circuit board 111. The detection circuit includes a differential amplifier 113a, a differential amplifier 113b, and a detection section 114. The differential amplifier 113a outputs a difference between voltages output from the Hall element 112a and the Hall element 112c. The differential amplifier 113b outputs a difference between voltages output from the Hall element 112b and the Hall element 112d. On the basis of the outputs of the differential amplifiers 113a and 113b, the detection section 114 outputs a signal which specifies the position of the magnet 103 (see, for example, Japanese Patent Application Laid-Open (kokai) No. 2003-196019).
In this pointing device 100, when the magnet 103 is located at the initial position, the respective distances between the magnet 103 and the four Hall elements 112a, 112b, 112c, and 112d are equal to one another. Therefore, the four Hall elements 112a, 112b, 112c, and 112d are equal to one another in terms of the density of magnetic flux passing therethrough in the Z-axis direction. As a result, all the Hall elements output the same voltage, so that the outputs of the differential amplifiers 113a and 113b both become zero. As a result, the detection section 114 outputs a signal indicating that the magnet 103 is located at the initial position.
Meanwhile, when the magnet 103 moves in the positive direction along the X-axis, the density of the magnetic flux passing through the Hall element 112c in the Z-axis direction becomes greater than that of the magnetic flux passing through the Hall element 112a in the Z-axis direction. Accordingly, the Hall element 112c outputs a higher voltage than does the Hall element 112a. As a result, the differential amplifier 113a outputs a positive voltage corresponding to the difference between the output voltage of the Hall element 112c and that of the Hall element 112a. The magnitude of this voltage increases as the magnet 103 approaches the Hall element 112c. 
Meanwhile, the density of the magnetic flux passing through the Hall element 112b in the Z-axis direction and the density of the magnetic flux passing through the Hall element 112d in the Z-axis direction decrease by the same small amount as compared with the case where the magnet 103 is located at the initial position. Accordingly, the Hall element 112b and the Hall element 112d output the same voltage, so that the output of the differential amplifier 113b remains zero. As a result, the detection section 114 outputs a signal indicating that the magnet 103 has moved in the X-axis positive direction by a distance corresponding to the output voltage of the differential amplifier 113a. As described above, the magnetic sensor 110 is configured to detect the position of the magnet 103 by detecting the vertical component of a magnetic field generated by the magnet 103 (a magnetic field component parallel to a straight line connecting the magnetization center of one magnetic pole of the magnet 103 and the magnetization center of the other magnetic pole thereof; in this case, a magnetic field along the Z-axis direction). Notably, a straight line connecting the magnetization center of one magnetic pole of a magnet and the magnetization center of the other magnetic pole thereof will be also referred to as a “magnetization axis.”
However, such a pointing device 100 has a drawback in that considerable restrictions are imposed on the size of the magnet 103, the positions of arrangement of the Hall elements 112a, 112b, 112c, and 112d, and the distances therebetween. This drawback will be described with reference to FIGS. 24 and 25, while the case where the magnet moves in the X-axis positive direction is taken as an example. FIG. 24 is a schematic view showing a state in which the magnet 103 is located at the initial position. FIG. 25 is a schematic view showing a state in which the magnet 103 has moved to a position at which the magnetization axis of the magnet 103 passes through the center of the Hall element 112c (hereinafter referred to as “detection limit position”).
As can be understood from FIGS. 24 and 25, during a period in which the magnet 103 moves from the initial position shown in FIG. 24 to the detection limit position shown in FIG. 25, the density of magnetic lines of force (magnetic flux) of the vertical magnetic field passing through the Hall element 112a gradually decreases and the density of magnetic lines of force of the vertical magnetic field passing through the Hall element 112c gradually increases, as the magnet 103 moves in the X-axis positive direction.
However, when the magnet 103 reaches the vicinity of the detection limit position shown in FIG. 25, the vertical magnetic field hardly acts on the Hall element 112a. Therefore, even when the magnet 103 moves further in the X-axis positive direction beyond the detection limit position shown in FIG. 25, the output of the Hall element 112a hardly changes. Meanwhile, when the magnet 103 moves further in the X-axis positive direction beyond the detection limit position shown in FIG. 25, the density of magnetic lines of force of the vertical magnetic field passing through the Hall element 112c starts to decrease. As a result, the magnetic sensor 110 outputs the same value for both the case where the magnet is a short distance away from the detection limit position in the X-axis positive direction and the case where the magnet is a short distance away from the detection limit position in the X-axis negative direction.
Accordingly, in the conventional pointing device 100, a range along the X-axis direction in which the magnetic 103 is movable (an X-axis range in which the position of the magnet 103 is detectable) is restricted between the Hall element 112a and the Hall element 112c. Therefore, it is impossible to provide a pointing device in which the magnet 103 can be moved over a large distance. This problem can be solved by increasing the distance between the Hall element 112a and the Hall element 112c. In this case, however, the size of the magnet 103 increases, due to the necessity of applying sufficient vertical magnetic fields to the respective Hall elements, and/or the distance between the magnet 103 and the mounting substrate 101 increases. As a result, there arises a problem of an increase in the sizes of the magnetic sensor 110 and the pointing device 100.